
<template>
  <div>
    <el-card>
      <el-table :data="tableData" stripe style="width: 100%">
        <el-table-column type="index" label="#" width="180"> </el-table-column>
        <el-table-column prop="authName" label="权限名称" width="180">
        </el-table-column>
        <el-table-column prop="path" label="权限路径"> </el-table-column>
        <el-table-column prop="level" label="权限等级">
          <template slot-scope="scope">
            <el-tag
              :type="
                scope.row.level == 0
                  ? ''
                  : scope.row.level == 1
                  ? 'success'
                  : 'warning'
              "
              >{{
                scope.row.level == 0
                  ? "一级"
                  : scope.row.level == 1
                  ? "二级"
                  : "三级"
              }}</el-tag
            >
          </template>
        </el-table-column>
      </el-table>
    </el-card>
  </div>
</template>

<script>
import { rightsList } from "../../http/right";
export default {
  name: "",
  components: {},
  data() {
    return {
      tableData: [],
    };
  },
  created() {
    rightsList("list").then((res) => {
      console.log(res);
      this.tableData = res.data;
    });
  },
  mounted() {},
  methods: {},
};
</script>
<style scoped lang='scss'>
.el-card{
  margin-top: 20px;
}
</style>
